/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.openbravo.bean;

import cn.ekuma.data.dao.bean.I_AutoGeneratorStringKey;
import cn.ekuma.data.dao.bean.I_ModifiedLogBean;
import java.util.Date;
import java.util.HashMap;

/**
 *
 * @author Administrator
 */
public  class Product extends ProductInfo implements I_ModifiedLogBean<String>,I_AutoGeneratorStringKey {
    private static final long serialVersionUID = 7587696873036L;

    protected HashMap<String, String> attributes= new HashMap<String,String>();;
    protected String attributesetid;
    protected String categoryid;
    public Date lastModified;

    protected double m_dCustomerPrice; //会员价
    protected double m_dPriceBuy;
    protected double m_dPriceSell; //普通价
    protected double m_dWholesalePrice; //批发价
    
    protected String taxcategoryid;
    
    protected boolean m_bManufacturing;
    
    public Date curDate;//加入时间
    
    protected boolean isBomStore=true;

    public final String getCategoryID() {
        return categoryid;
    }

    public final void setCategoryID(String sCategoryID) {
        categoryid = sCategoryID;
    }

    public final String getTaxCategoryID() {
        return taxcategoryid;
    }

    public final void setTaxCategoryID(String value) {
        taxcategoryid = value;
    }

    public final String getAttributeSetID() {
        return attributesetid;
    }
    public final void setAttributeSetID(String value) {
        attributesetid = value;
    }

    public final double getPriceBuy() {
        return m_dPriceBuy;
    }

    public final void setPriceBuy(double dPrice) {
        m_dPriceBuy = dPrice;
    }

    public final double getPriceSell() {
        return m_dPriceSell;
    }

    public final void setPriceSell(double dPrice) {
        m_dPriceSell = dPrice;
    }

    public final double getPriceSellTax(Tax tax) {
        return m_dPriceSell * (1.0 + tax.getRate());
    }

    public String getProperty(String key) {
        return attributes.get(key);
    }
    public String getProperty(String key, String defaultvalue) {
        String ret=attributes.get(key);
        return ret!=null?ret:defaultvalue;
    }

    public void setProperty(String key, String value) {
        attributes.put(key, value);
    }

    public HashMap getProperties() {
        return attributes;
    }

    public void setProperties(HashMap attr){
        this.attributes=attr;
    }

     public Date getLastModified() {
        return lastModified;
    }

    public void setLastModified(Date lastModified) {
        this.lastModified = lastModified;
    }

    

    public double getM_dCustomerPrice() {
        return m_dCustomerPrice;
    }

    public void setM_dCustomerPrice(double m_dCustomerPrice) {
        this.m_dCustomerPrice = m_dCustomerPrice;
    }


    public void setAttributes(HashMap attributes) {
        this.attributes = attributes;
    }

    public String getKey() {
        return m_ID;
    }

    public void setKey(String key) {
        this.m_ID=key;
    }

	public boolean isM_bManufacturing() {
		return m_bManufacturing;
	}

	public void setM_bManufacturing(boolean m_bManufacturing) {
		this.m_bManufacturing = m_bManufacturing;
	}

	public double getM_dWholesalePrice() {
		return m_dWholesalePrice;
	}

	public void setM_dWholesalePrice(double m_dWholesalePrice) {
		this.m_dWholesalePrice = m_dWholesalePrice;
	}

	public Date getCurDate() {
		return curDate;
	}

	public void setCurDate(Date curDate) {
		this.curDate = curDate;
	}

	public boolean isBomStore() {
		return isBomStore;
	}

	public void setBomStore(boolean isBomStore) {
		this.isBomStore = isBomStore;
	}
	
	
	
	
}
